<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ApiController extends Controller
{
    //

    public function test()
    {
        $test = "山东省枣庄市";
        list($province, $city) = explode("省", $test);
        dd($province . '省', $city);
    }

    public function index()
    {
        dd(555);
        $method = Request()->post('method');
        $to_class = "LoginController";
//        dd(__NAMESPACE__ );
//        $result=call_user_func(array(__NAMESPACE__.'\\'.$to_class,$method));
        $result = call_user_func_array(array(__NAMESPACE__ . '\\' . $to_class, $method), array("id" => 1));

        dd($result);
    }
}
